package com.zf.springlearn.lifecycle;

import lombok.Data;
import org.springframework.stereotype.Component;

import java.util.Objects;

/**
 * @author zhangfei
 * @date 2024/4/9 16:19
 **/
@Component
@Data
public class ResourceBean {
    private String name = "resourceBean";

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ResourceBean resourceBean = (ResourceBean) o;
        return name.equals(resourceBean.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name);
    }
}
